package chapter11.p;
import thinkingJava.chapter11.Stack;
public class P15 {
	public static void main(String[] args) {
		Stack<String> stack = new Stack<String>();
		stack.push("U");
		stack.push("n");
		stack.push("c");
		System.out.println(stack.pop());
		System.out.println(stack.pop());
		System.out.println(stack.pop());
		stack.push("e");
		stack.push("r");
		stack.push("t");
		System.out.println(stack.pop());
		System.out.println(stack.pop());
		System.out.println(stack.pop());
		stack.push("a");
		System.out.println(stack.pop());
		stack.push("i");
		System.out.println(stack.pop());
		stack.push("n");
		stack.push("t");
		stack.push("y");
		System.out.println(stack.pop());
		System.out.println(stack.pop());
		System.out.println(stack.pop());
		stack.push("-");
		stack.push("r");
		stack.push("u");
		System.out.println(stack.pop());
		System.out.println(stack.pop());
		stack.push("l");
		stack.push("e");
		stack.push("s");
		System.out.println(stack.pop());
		System.out.println(stack.pop());
		System.out.println(stack.pop());
		System.out.println(stack);
	}
}
